//  Author: Louis Holladay
//  Website: AdminDesigns.com
//  Last Updated: 01/01/14 
// 
//  This file is reserved for changes made by the user 
//  as it's often a good idea to seperate your work from 
//  the theme. It makes modifications, and future theme
//  updates much easier 
// 

//  Place custom styles below this line 
///////////////////////////////////////

$(document).ready(function() {
    $("#btnLogin").click(function() {
        dangNhap();
    });
});


function dangNhap() {
    var user={};
    user.UserName = $("#txtUserName").val().trim();
    user.Password = $("#txtPassword").val().trim();
    user.RememberMe = false;
    var options = {};
    options.url = "/Account/LogOn";
    options.type = 'POST';
    options.data = user;
    options.success = function (res) {
        window.location.replace(res);
    };
    options.error = function (jqXhr, status, err) { alert(status); };
    $.ajax(options);
}